/**
 * Log4jLogContextInitializer
 *
 * @author Chris Pratt
 *
 * 11/11/2011
 */
package com.anodyzed.onyx.log.log4j;

import com.anodyzed.onyx.log.LogBuilder;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class Log4jLogContextInitializer implements ServletContextListener {

  /**
   * The Servlet Context is being constructed, initialize the LogBuilder to use 
   * this Factory 
   *
   * @param event The Servlet Context Event
   */
  @Override
  public void contextInitialized (ServletContextEvent event) {
    LogBuilder.setLogFactory(new Log4jLogFactory());
  } //contextInitialized

  /**
   * The Servlet Context is being destroyed, clean up
   *
   * @param event The Servlet Context Event
   */
  @Override
  public void contextDestroyed (ServletContextEvent event) {
  } //contextDestroyed
  
} //*Log4jLogContextInitializer
